package com.health.controller;

import com.health.dto.DoctorDTO;
import com.health.result.PageResult;
import com.health.result.Result;
import com.health.service.DoctorService;
import com.health.vo.DoctorPageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/doctor")
public class DoctorController {
    @Autowired
    private DoctorService doctorService;

    @GetMapping("/list")
    public Result list(DoctorDTO doctorDTO) {
        List<DoctorPageVO> pageResult = doctorService.list(doctorDTO);
        return Result.success(pageResult);
    }
}
